<?php defined('SYSPATH') or die('No direct script access.');

class Model_Blog extends ORM {
	protected $_has_many = array(
	   'categories'    => array(
		   'model'       => 'category',
		   'foreign_key' => 'category_id',
		   'through'      => 'blog_category',
		   'far_key'      => 'blog_id',
	   ),
	);

	protected $_has_one = array(
		'user'    => array(
			'model'         => 'user',
			'foreign_key' => 'id',
		),
	);
}
?>
